04. Playing with Rays

Playing with Rays

Course Asset

Video Addendum

At 2:27 minutes into the video (and any time the camera is selected)

When the instructor adds the DetectTreasure script component to the Main Camera game object:

  • The Main Camera game object has a Physics Raycaster component.
  • The Physics Raycaster component is not necessary because the DetectTreasure script component casts the ray.

Important! In this exercise, we do not need Unity's Physics Raycaster (or Google's Gvr Pointer Physics Raycaster) because the DetectTreasure script component casts the ray.

Additional Reading